home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / ov143b.zip / MENU.H < prev    next >
C/C++ Source or Header  |  1993-01-04  |  1KB  |  49 lines

  1. /*  001  20-Apr-87  menu.h
  2.  
  3.         Copyright (c) 1987 by Blue Sky Software.  All rights reserved.
  4. */
  5.  
  6. /* menu selection entry structure */
  7.  
  8. typedef struct menu_selection {
  9.    char *choice;
  10.    char *prompt;
  11.    int (*func)();
  12.    struct menu_selection *sub_menu;
  13. } MENU;
  14.  
  15. /* menu state control block */
  16.  
  17. #define MAX_MENU_SELECTIONS 20
  18.  
  19. typedef struct {
  20.    MENU *current_menu;
  21.    int number_selections;
  22.    int current_selection;
  23.    struct {
  24.       unsigned char position;
  25.       unsigned char length;
  26.    } selection[MAX_MENU_SELECTIONS];
  27. } MENU_STATE;
  28.  
  29. /* function declaration stuff */
  30.  
  31. #define ALTCALL pascal         /* alternate calling method reduces overhead */
  32.  
  33. #ifdef LINT_ARGS
  34. void ALTCALL menu_save(void);
  35. void ALTCALL menu_restore(void);
  36. void ALTCALL menu_init(void);
  37. void ALTCALL menu_advance(void);
  38. void ALTCALL menu_backup(void);
  39. int  ALTCALL menu_do_char(int);
  40. void ALTCALL menu_do_current(void);
  41. #else
  42. void ALTCALL menu_save();
  43. void ALTCALL menu_restore();
  44. void ALTCALL menu_init();
  45. void ALTCALL menu_advance();
  46. void ALTCALL menu_backup();
  47. int  ALTCALL menu_do_char();
  48. void ALTCALL menu_do_current();
  49. #endif